package com.example.demo.pojo.vo;

import com.example.demo.pojo.entity.ExamFile;
import com.example.demo.pojo.entity.ExamPaper;
import lombok.Data;

import java.time.LocalDateTime;

/**
 *
 * @author fjh
 */
@Data
public class ExamVO {
    private Integer id;
    //关于卷子的信息
    private Integer examPaperId;
    private String examPaperName;
    private Double averageDifficulty;
    private String description;
    private Integer totalScore;
    private Integer questionCount;
    //关于卷子文件的信息
    private Integer examFileId;
    private String fileName;
    private String createUser;

    //初始化卷子信息
    public void initExamPaper(ExamPaper examPaper){
        this.examPaperId=examPaper.getId();
        this.examPaperName=examPaper.getExamPaperName();
        this.averageDifficulty=examPaper.getAverageDifficulty();
        this.description=examPaper.getDescription();
        this.totalScore=examPaper.getTotalScore();
        this.questionCount=examPaper.getQuestionCount();
    }
    //初始化文件信息
    public void initExamFile(ExamFile examFile){
        this.examFileId=examFile.getId();
        this.fileName=examFile.getFileName();
        this.createUser=examFile.getCreateUser();
    }

}
